/**
 * @(#) DataType.java
 */

package cn.edu.sjtu.se.dslab.component.data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

@Entity
@Table(name = "data_type")
@PrimaryKeyJoinColumn(name = "id")
public class DataType extends DomainEntity {

	private static final long serialVersionUID = 1L;
	
	//DataType的类别，分为基本类型，枚举类型和struct类型
	private String category;
	
	//在category表示枚举类型的情况下，对应的枚举列表（以;隔开）
	private String enumList;

	//限制条件
	private String striction;
	
	//基本类型导出xmi时，对应的ID
	private String xmiId;
	
	@Column(name = "category", nullable = false, length = 32)
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	@Column(name = "enum_list", nullable = true, length = 300)
	public String getEnumList() {
		return enumList;
	}

	public void setEnumList(String enumList) {
		this.enumList = enumList;
	}

	@Column(name = "striction", nullable = true, length = 255)
	public String getStriction() {
		return striction;
	}

	public void setStriction(String striction) {
		this.striction = striction;
	}
	
	@Column(name = "xmi_id", nullable = true, length = 255)
	public String getXmiId() {
		return xmiId;
	}

	public void setXmiId(String xmiId) {
		this.xmiId = xmiId;
	}
}
